/**
 * 版权所有 2009-2015 中国中医科学院中医药信息研究所 何前锋 frontpeak@yahoo.com.cn
 **/
package cn.ac.cintcm.sh.domain;

import java.util.List;

public class TextArea {
    private boolean hasNext;
    private boolean hasPrevious;
    private List<Article> articles;
    
    private int nextId=1;
    
    private int previousId=1;
    
    private int chapterId=1;
    
    public TextArea(int chapterId) {
        this.chapterId = chapterId;
    }
    public List<Article> getArticles() {
        return articles;
    }
    public void setArticles(List<Article> articles) {
        this.articles = articles;
    }
    public boolean getHasNext() {
        return hasNext;
    }
    public void setHasNext(boolean hasNext) {
        this.hasNext = hasNext;
        if (hasNext) {
            this.nextId = chapterId + 1;
        }
    }
    public boolean getHasPrevious() {
        return hasPrevious;
    }
    public void setHasPrevious(boolean hasPrevious) {
        this.hasPrevious = hasPrevious;
        if (hasPrevious) {
            this.previousId = chapterId - 1;
        }
    }
    public int getNextId() {
        return nextId;
    }
    public int getPreviousId() {
        return previousId;
    }
    public int getChapterId() {
        return chapterId;
    }
    public void setChapterId(int chapterId) {
        this.chapterId = chapterId;
    }

}